package cate.game.role.res.call.base;

import com.fasterxml.jackson.annotation.JsonIgnore;
import easy.java.dev.note.NoteClass;
import easy.java.dev.note.NoteField;
import cate.game.role.Role;
import lombok.Data;


@Data
@NoteClass("召唤结果")
public class CallResult {

    @NoteField(value = "唯一ID")
    public int id;

    @NoteField("第几次")
    private int index;

    @NoteField("最后一次替换来自的机制优先级")
    public int priority;

    @NoteField("公告")
    public boolean notice;

    @NoteField("双卡")
    public boolean dup;

    @NoteField("放逐")
    public boolean remove;

    public CallResult() {
    }

    public CallResult(int index, int id) {
        this.index = index;
        this.id = id;
    }

    @JsonIgnore
    public cate.common.table.call.row.CallWeightRow getRow(Role role) {
        return role.getGame().table.call.weight.get(this.id);
    }

}
